package alloy.util;

import java.util.Collection;
import java.util.Iterator;


public class SafeIterator implements Iterator
{

    private Iterator i;

    public SafeIterator(Iterator i)
    {
	this.i = i;
    }
    
    public SafeIterator(Collection c)
    {
	this.i = c.iterator();

    }

    public boolean hasNext()
    {
	return i.hasNext();
    }

    public Object next()
    {
	return i.next();
    }

    public void remove()
    {
	throw new UnsupportedOperationException("Why are you calling remove?  What is going through your mind right now?");
    }
}
